package com.star.spring.ratelimit.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * 异步日志配置属性
 * 
 * @author star
 * @since 2025-01-24
 */
@Data
@Component
@ConfigurationProperties(prefix = "async.log")
public class AsyncLogProperties {
    
    /**
     * 核心线程数
     */
    private int corePoolSize = 2;
    
    /**
     * 最大线程数
     */
    private int maxPoolSize = 5;
    
    /**
     * 队列容量
     */
    private int queueCapacity = 1000;
    
    /**
     * 线程空闲时间（秒）
     */
    private int keepAliveSeconds = 60;
    
    /**
     * 线程名前缀
     */
    private String threadNamePrefix = "log-async-";
    
    /**
     * 关闭时等待任务完成
     */
    private boolean waitForTasksToCompleteOnShutdown = true;
    
    /**
     * 等待时间（秒）
     */
    private int awaitTerminationSeconds = 30;
}
